#!/bin/sh
set -e

echo $FLAG > /flag
export FLAG=not_flag
FLAG=not_flag

# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
	set -- php "$@"
fi

exec "$@"
